package com.indusfo.spc.pda.controller;

import com.indusfo.spc.pda.pojo.StationDosing;
import com.indusfo.spc.pda.service.StationDosingService;
import com.indusfo.spc.pojo.Dosing;
import com.indusfo.spc.vo.JSONObject;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName StationDosingController
 * @Description 工位叫料控制层
 * @Author louk
 * @Date 2019/12/25 16:35
 */
@RestController
@RequestMapping("/pda/stationDosing")
public class StationDosingController {

    @Resource
    StationDosingService stationDosingService;
    /**
     * 通过工位产线id来查询工位叫料控制层
     * @param stationDosing
     * @return
     */
    @RequestMapping("queryStationDosingList")
    public JSONObject queryStationDosingList(StationDosing stationDosing){
        return  stationDosingService.queryStationDosingList(stationDosing);
    }

    /**
     * 新增工位叫料
     * @param stationDosing
     * @return
     */
    @RequestMapping("insertStationDosing")
    public JSONObject insertStationDosing(@RequestBody StationDosing stationDosing){
        return  stationDosingService.insertStationDosing(stationDosing);
    }
    /**
     * 编辑工位叫料
     * @param stationDosing
     * @return
     */
    @RequestMapping("updateStationDosing")
    public JSONObject updateStationDosing(@RequestBody  StationDosing stationDosing){
        return  stationDosingService.updateStationDosing(stationDosing);
    }

    /**
     * 查询叫料信息
     * @param dosing
     * @return
     */
    @RequestMapping("queryDosingList")
    public JSONObject queryDosingList(@RequestBody Dosing dosing){
        return  stationDosingService.queryDosingList(dosing);
    }

    /**
     * 新增工位叫料
     * @param stationDosingList
     * @return
     */
    @RequestMapping("insertStationDosingList")
    public JSONObject insertStationDosingList(@RequestBody List<StationDosing> stationDosingList){
        return  stationDosingService.insertStationDosingList(stationDosingList);
    }

    /**
     * 通过工位产线id来查询工位叫料控制层
     * @param stationDosing
     * @return
     */
    @RequestMapping("clientQueryStationDosingList")
    public JSONObject clientQueryStationDosingList(@RequestBody StationDosing stationDosing){
        return  stationDosingService.clientQueryStationDosingList(stationDosing);
    }
    /**
     * 更新叫料配送状态
     * @param
     * @return
     */
    @RequestMapping("updateDosingState")
    public JSONObject updateDosingState(@RequestBody StationDosing stationDosing){
        return  stationDosingService.updateDosingState(stationDosing);
    }


}
